<?php

class Error extends Model_Abstract
{
	public function addError($site, $msg)
	{
		try
		{
			$sql = "insert into errors set site=?, message=?, created=?";
			return $this->_connection->execute($sql, array($site, $msg, time()));
		}
		catch (Exception $e)
		{
			QLog::log(__CLASS__.' '.__METHOD__.' --- '.$e->getMessage(), QLog::ERR);
			throw new Model_Exception($e->getMessage(), $e->getCode());
		}
	}
}
?>